-- GENERATED SPELL FOR [Serpentshrine Tidecaller] --


function spell0_22238(pUnit, Event) --@Frost Nova,Self--
pUnit:FullCastSpellOnTarget(39035,pUnit)
pUnit:RegisterEvent('Sorts_22238', 8341, 1)
end

function spell1_22238(pUnit, Event) --@Water Bolt Volley,n/a--
pUnit:FullCastSpellOnTarget(38623,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_22238', 590, 1)
end

function Sorts_22238(pUnit, Event)
local choix_sorts_22238 = math.random(0, 1)
if choix_sorts_22238 == 0 then
pUnit:RegisterEvent('spell0_22238', 1, 1)
end
if choix_sorts_22238 == 1 then
pUnit:RegisterEvent('spell1_22238', 1, 1)
end
end

function mob22238_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_22238', math.random(1500, 3000), 1)
end

function mob22238_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob22238_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob22238_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(22238, 1, 'mob22238_Action')
RegisterUnitEvent(22238, 2, 'mob22238_Leave')
RegisterUnitEvent(22238, 3, 'mob22238_Kill')
RegisterUnitEvent(22238, 4, 'mob22238_Die')
